<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<html>
<head>
<title></title>
</head>
<body>
<f:view>
	<h:form>
		<h:panelGrid columns="2">
		Marka:<h:inputText value="#{carBean.myCar.marka}" />
		Model:<h:inputText value="#{carBean.myCar.model}" />
		Yil:<h:inputText value="#{carBean.myCar.yil}" />
		KM:<h:inputText value="#{carBean.myCar.km}" />

			<h:commandButton action="#{carBean.addCar}" value="Ekle" />
		</h:panelGrid>
		<br />
		<h:dataTable value="#{carBean.cars}" var="k">
			<h:column>
				<f:facet name="header">
					<h:outputText value="Marka" />
				</f:facet>
				<h:outputText value="#{k.marka}" />
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="Model" />
				</f:facet>
				<h:outputText value="#{k.model}" />
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="Yil" />
				</f:facet>
				<h:outputText value="#{k.yil}" />
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="KM" />
				</f:facet>
				<h:outputText value="#{k.km}" />
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="SIL" />
				</f:facet>
				<h:commandLink action="#{carBean.aracSil}" value="SİL">
					<f:setPropertyActionListener value="#{car}" target="#{carBean.myCar}" />
				</h:commandLink>
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="DUZENLE" />
				</f:facet>
				<h:commandLink action="#{carBean.aracSil}" value="DUZENLE">
					<f:setPropertyActionListener value="#{car}" target="#{carBean.myCar}" />
				</h:commandLink>
			</h:column>

		</h:dataTable>

	</h:form>
</f:view>
</body>
</html>
